<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>点击新增</title>
    <script src="vue.js"></script>
</head>
<body>
    <div id="app">
    <h2>{{add}}</h2>
    <h2 v-for="add in bl">{{add}}</h2>
    <button v-for="addbt in bb">{{addbt}}</button><br>
    <hr>
    <button @click.once="ah">点我增加一行</button> 
    <button @click="ab">点我增加一个按钮</button>
    </hr>
    </div>

    <script>
        var vm=new Vue({
            el:"#app",
            data(){
                return{
                    add:"鱼",
                    bl:[],
                    bb:[]
                }
            },
            methods:{
                ah(){
                    this.bl.push(this.add + ",我是新增的一行")
                },
                ab(){
                    this.bb.push(this.add + ',我是新增的按钮')
                }
            }
        })
        
    </script>
</body>
</html>